package com.briup.pts.domain.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.PastOrPresent;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 检疫登记
 * @TableName quarantine_registration
 */
@Data
@Schema(description="检疫登记")
public class QuarantineRegistration implements Serializable {
    /**
     * 记录id
     */
    @Schema(description="记录id")
    private Integer grId;
    /**
     * 检疫时间
     */
    @Schema(description="检疫时间")
    @PastOrPresent(message = "检疫时间不能晚于当前时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime grTime;
    /**
     * 检疫证明图片
     */
    @Schema(description="检疫证明图片")
    @NotBlank(message = "必须携带检疫证明图片")
    private String grImg;
    /**
     * 检疫机构
     */
    @Schema(description="检疫机构")
    @NotBlank(message = "必须指明检疫机构")
    private String grMechanism;
    /**
     * 批次id
     */
    @Schema(description="批次id")
    @NotBlank(message = "必须指定检疫报告所属批次")
    private String grBatchId;
    /**
     * 检疫结果
     */
    @Schema(description="检疫结果")
    @NotBlank(message = "必须指明检疫结果")
    @JsonProperty("bQualified")
    private String bQualified;
}
